home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
earcd
/
comm
/
tcp
/
ifcheck.lha
/
ifcheck.readme
< prev
next >
Wrap
Text File
|
1997-01-31
|
1KB
|
55 lines
Short: Check status of SANA-II interface under AmiTCP
Uploader: scampi@dial.pipex.com (Mathew Hendry)
Author: scampi@dial.pipex.com (Mathew Hendry)
Type: comm/tcp
Version: 0.0
Description
-----------
This simple tool allows one to check the status (up or down) of a SANA-II
network interface. It opens an AmiTCP socket to gather information, so AmiTCP
must be active, or any interface (whether up or not) will be reported as being
down.
To ease use in scripts, ifcheck will set a return code of 5 (WARN) if the
specified interface is down (or AmiTCP is inactive), and a return code of 0 (no
error) if the interface is up.
Source code in C is included. ifcheck was compiled with SAS/C 6.57, using the
AmiTCP version 4.3 SDK.
Requirements
------------
AmigaOS version 37 or higher
AmiTCP version 3.0 or higher
Example
-------
.key ARTICLE/A
.bra {
.ket }
; simple script to post / spool mail
If EXISTS {ARTICLE}
; check whether we are online
ifcheck cslip0 > NIL:
If NOT WARN
send_mail {ARTICLE}
empty_spool
Else
spool_mail {ARTICLE}
EndIf
EndIf
Author
------
Mathew Hendry (scampi@dial.pipex.com, mathew.hendry@vissci.demon.co.uk)